'use strict';

const Controller = require('egg').Controller;

class HomeController extends Controller {
  async index() {
    const {
      ctx,
    } = this;
    ctx.helper.success({
      data: '1',
    });
  }
  async types() {
    const {
      ctx,
      service,
    } = this;
    const result = await service.home.types();
    ctx.helper.success(result);
  }
  async recom() {
    const {
      ctx,
      service,
    } = this;
    const query = ctx.query;
    const result = await service.home.recom(query);
    ctx.helper.success(result);
  }
}

module.exports = HomeController;
